package com.zhu.instructions.stack;
// instructions/stack/POP2.java
import com.zhu.instructions.base.NoOperandsInstruction;
import com.zhu.rtda.Frame;
import com.zhu.rtda.OperandStack;

/**
 * 弹出栈顶两个变量
 * 适用于：long, double，或两个连续的 int/float 等
 * 指令：pop2
 */
public class POP2 extends NoOperandsInstruction {
    @Override
    public void execute(Frame frame) {
        OperandStack stack = frame.getOperandStack();
        stack.popSlot(); // 弹出第二个 slot
        stack.popSlot(); // 弹出第一个 slot
    }
}
